﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Fractals
{
    class Grid
    {
        private bool[,] m_cells;

        public int Width { get; private set; }
        public int Height { get; private set; }

        public Grid(int width, int height)
        {
            Width = width;
            Height = height;

            // create a new 2D array of cells
            m_cells = new bool[Width, Height];
            
            // fill each cell with false
            // TODO:check if necessary            
            for (int x = 0; x < Width; x++)
            {
                for (int y = 0; y < Height; y++)
                {
                    m_cells[x, y] = false;
                }
            }
        }

        public bool GetPixel(int x, int y)
        {
            return m_cells[x, y];
        }

        public void SetPixel(int x, int y)
        {
            m_cells[x, y] = true;
        }

    }
}
